package action;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author dingyuanwei
 * @version 建立時間：Dec 24, 201011:34:01 AM
 * 類別說明:
 */
public class LoginMessageAction extends ActionSupport {

	private String username;
	private String Password;
	private String tip;
	@Override
	public String execute() throws Exception {
		ActionContext ac = ServletActionContext.getContext();
		if(username !=null && username.length() > 0){
			this.tip =this.getText("loginsuccess" ,new String[]{this.username});
			return SUCCESS;
		}else{
			ac.getApplication().put("popedon", this.getText("loginFaile"));
			return LOGIN;
		}
	}
	public String getPassword() {
		return Password;
	}
	public void setPassword(String password) {
		Password = password;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getTip() {
		return tip;
	}
	public void setTip(String tip) {
		this.tip = tip;
	}

	
}
